<?php
include ("head.php");
include ("db.php");
$sql = "select * from channel where id='1'";
$result = mysql_query($sql);
$rs=mysql_fetch_array($result);
mysql_close($con);
?>
<iframe
	width=174 height=172 name="gToday:normal:calendar/agenda.js"
	id="gToday:normal:calendar/agenda.js" src="calendar/ipopeng.htm"
	scrolling="no" frameborder="0"
	style="visibility: visible; z-index: 999; position: absolute; left: -500px; top: 0px;"></iframe>

<form name="form1" action="channelmanage.php" method="post">
<div class="Main_body" id="Main_body">
<div class="Main_locationBar" id="Main_locationBar">
<div class="Main_locationBar_head"></div>
<div class="Main_locationBar_body"><span id="CurrentPosition">Location:Channel Define</span></div>
<div class="Main_locationBar_foot"></div>
</div>
<div class="Main_handleBar check_pass" id="Main_handleBar"
<?if($msg==""){?> style="display: none" <?}?>>
<div class="Main_handleBar_head"></div>
<div class="Main_handleBar_body">
<p><?echo $msg;?></p>
</div>
<div class="Main_handleBar_foot"><a href="javascript:void(0)"
	class="close" onclick="closeHandleBar()"></a></div>
</div>
<div class="Main_bodyAddBar">
<div class="Main_bodyAddBar_head"></div>
<div class="Main_bodyAddBar_body">
<table width="100%" border="0" cellpadding="0" cellspacing="1"
	class="addTable">
	<tbody>
		<tr>
			<td class="title">Channel One：<em>*</em></td>
			<td class="content2"><span class="content"> <input type="text"
				name="channel1" class="input_long" value="<?=$rs["channel1"]?>" /> </span></td>
		</tr>
		<tr>
			<td class="title">Channel Two：<em>*</em></td>
			<td class="content2"><span class="content"><input type="text"
				name="channel2" class="input_long" value="<?=$rs["channel2"]?>" /> </span></td>
		</tr>
		<tr>
			<td class="title">Channel Three：<em>*</em></td>
			<td class="content2"><span class="content"><input type="text"
				name="channel3" class="input_long" value="<?=$rs["channel3"]?>" /> </span></td>
		</tr>
		<tr>
			<td class="title">Channel Four：<em>*</em></td>
			<td class="content2"><span class="content"><input type="text"
				name="channel4" class="input_long" value="<?=$rs["channel4"]?>" /> </span></td>
		</tr>
		<tr>
			<td class="title">Channel Five：<em>*</em></td>
			<td class="content2"><span class="content"><input type="text"
				name="channel5" class="input_long" value="<?=$rs["channel5"]?>" /> </span></td>
		</tr>
		<tr>
			<td class="title">Channel Six：<em>*</em></td>
			<td class="content2"><span class="content"><input type="text"
				name="channel6" class="input_long" value="<?=$rs["channel6"]?>" /> </span></td>
		</tr>
		<tr>
			<td class="title">Channel Seven：<em>*</em></td>
			<td class="content2"><span class="content"><input type="text"
				name="channel7" class="input_long" value="<?=$rs["channel7"]?>" /> </span></td>
		</tr>
		<tr>
			<td class="title">Channel Eight：<em>*</em></td>
			<td class="content2"><span class="content"><input type="text"
				name="channel8" class="input_long" value="<?=$rs["channel8"]?>" /> </span></td>
		</tr>
	</tbody>
</table>
</div>

<div class="Main_bodyAddBar_foot"></div>
</div>

<div class="Main_buttonGroupBar">
<div class="Main_buttonGroupBar_head"></div>
<div class="Main_buttonGroupBar_body"><input name="button" type="button"
	class="button" value="Save" onclick="toSubmit()" /></div>
<div class="Main_buttonGroupBar_foot"></div>
</div>
</div>
</form>
<script>
			function toValue(value,name){
				document.getElementById(name).value=value;
			}
			function toSubmit(){
				var channel1 =document.form1["channel1"].value;
				var channel2 =document.form1["channel2"].value;
				var channel3 =document.form1["channel3"].value;
				var channel4 =document.form1["channel4"].value;
				var channel5 =document.form1["channel5"].value;
				var channel6 =document.form1["channel6"].value;
				var channel7 =document.form1["channel7"].value;
				var channel8 =document.form1["channel8"].value;
				
				if(channel1==""){
					alert("Please input channel one");
					return ;
				}
				if(channel2==""){
					alert("Please input channel two");
					return ;
				}
				if(channel3==""){
					alert("Please input channel three");
					return ;
				}
				if(channel4==""){
					alert("Please input channel four");
					return ;
				}
				if(channel5==""){
					alert("Please input channel five");
					return ;
				}
				if(channel6==""){
					alert("Please input channel six");
					return ;
				}
				if(channel7==""){
					alert("Please input channle seven");
					return ;
				}
				if(channel8==""){
					alert("Please input channel eight");
					return ;
				}
				document.form1.submit();
			} 
   
		</script>
<!--</div>-->
<!--</div>-->
<?php
include ("end.php");
?>